<template>
  <div>
    <!-- 轮播图组件 -->
    <swiper :imgList="imgList" :isfull="true"> </swiper>
    <ul class="mui-table-view mui-grid-view mui-grid-9">
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link :to="{ name: 'newsList' }" class="title">
          <img src="../assets/images/menu1.png" />
          <div class="mui-media-body">新闻资讯</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link :to="{ name: 'photo_list' }" class="title">
          <img src="../assets/images/menu2.png" />
          <div class="mui-media-body">图片分享</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link :to="{ name: 'category' }" class="title">
          <img src="../assets/images/menu3.png" />
          <div class="mui-media-body">商品购买</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link :to="{ name: 'message' }" class="title">
          <img src="../assets/images/menu4.png" />
          <div class="mui-media-body">留言反馈</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link :to="{ name: 'video_list' }" class="title">
          <img src="../assets/images/menu5.png" />
          <div class="mui-media-body">视频专区</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link :to="{ name: 'user' }" class="title">
          <img src="../assets/images/menu6.png" />
          <div class="mui-media-body">我的设置</div>
        </router-link>
      </li>
    </ul>
  </div>
</template>
<script>
import swiper from "../components/swiper.vue";
export default {
  data() {
    return {
      imgList: [],
    };
  },
  created() {
    this.getImgList();
  },
  methods: {
    getImgList() {
      this.imgList = [
        {
          id: 1,
          img: require("../assets/photo/shangpin1.jpg"),
        },
        {
          id: 2,
          img: require("../assets/photo/shangpin2.jpg"),
        },
        {
          id: 3,
          img: require("../assets/photo/shangpin3.jpg"),
        },
        {
          id: 4,
          img: require("../assets/photo/shangpin4.jpg"),
        },
      ];
    },
  },
  components:{
      swiper
  }
};
</script>
<style lang="scss" scope>
    .mui-grid-view.mui-grid-9{
        background-color: #fff;
        border: none;
        img{
            width: 60px;
            height: 60px;
        }
    }
    .mui-table-view-cell > a.title{
        display: inline;
    }
    .mui-grid-view.mui-grid-9 .mui-table-view-cell{
        border: 0;
    }
    .mui-media-body{
        font-size: 14px;
    }


</style>